package com.AAA.controller.scl;

import com.AAA.entity.LayData;
import com.AAA.entity.MyPage;
import com.AAA.entity.scl.TSclRecord;
import com.AAA.service.scl.TSclRecordService;
import org.springframework.web.bind.annotation.*;
import org.springframework.beans.factory.annotation.Autowired;

/**
 * (TSclRecord)表控制层
 *
 * @author makejava
 * @since 2022-10-31 09:43:15
 */
@RestController
@RequestMapping("tSclRecord")
public class TSclRecordController {
    /**
     * 服务对象
     */
    @Autowired
    private TSclRecordService tSclRecordService;

    @GetMapping
    public LayData getData(MyPage myPage, TSclRecord record){
        return new LayData(tSclRecordService.getAll(myPage,record));
    }

    @GetMapping("{id}")
    public LayData getDetailData(@PathVariable Integer id, MyPage myPage){
        return new LayData(tSclRecordService.getDetailMsg(id,myPage));
    }

    @PostMapping("login")
    public LayData add(TSclRecord tSclRecord){
        return new LayData(tSclRecordService.login(tSclRecord));
    }

    @GetMapping("checkrecord")
    public LayData checkUser(TSclRecord record){
        return new LayData(tSclRecordService.checkrecord(record));
    }

    @GetMapping("tj1")
    public LayData tj1(MyPage myPage, TSclRecord record){
        return new LayData(tSclRecordService.tj1(myPage,record));
    }



}
